﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace S.Organization.Infrastructure.Migrations
{
    public partial class AddSupplier : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Supplier",
                columns: table => new
                {
                    SupplierId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SupplierName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    SupplierNumber = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    SupplierType = table.Column<bool>(type: "bit", nullable: false),
                    PrincipalTelephone = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    InputUnit = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    BuildingUser = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    Market = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    ServiceStaff = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    CollectionFile = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    UseOftate = table.Column<bool>(type: "bit", maxLength: 20, nullable: false),
                    PrincipalName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    IDNumber = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    Location = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
                    IndustryInvolved = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    AffiliatedUnit = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    Salesman = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    SupplierImg = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
                    DateOfCooperation = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Supplier", x => x.SupplierId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Supplier");
        }
    }
}
